#include "head.h"
#include "log.h"

int add_epoll(int epoll_fd, int fd){

    struct epoll_event event;
    event.events = EPOLLIN;
    event.data.fd = fd;

    int ret = epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fd, &event);
    if(ret == -1){
        ERROR_LOG("Error code: %d epoll_ctl failed.", ERROR1);
    }

    return 0;
}
